package com.ruoyi.medicine.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.medicine.domain.HisMedicineOrderAudit;
import com.ruoyi.medicine.mapper.HisMedicineOrderAuditMapper;
import com.ruoyi.medicine.service.IHisMedicineOrderAuditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 审核信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-02
 */
@Service
public class HisMedicineOrderAuditServiceImpl implements IHisMedicineOrderAuditService
{
    @Autowired
    private HisMedicineOrderAuditMapper hisMedicineOrderAuditMapper;

    /**
     * 查询审核信息
     * 
     * @param auditId 审核信息主键
     * @return 审核信息
     */
    @Override
    public HisMedicineOrderAudit selectHisMedicineOrderAuditByAuditId(Long auditId)
    {
        return hisMedicineOrderAuditMapper.selectHisMedicineOrderAuditByAuditId(auditId);
    }

    /**
     * 查询审核信息列表
     * 
     * @param hisMedicineOrderAudit 审核信息
     * @return 审核信息
     */
    @Override
    public List<HisMedicineOrderAudit> selectHisMedicineOrderAuditList(HisMedicineOrderAudit hisMedicineOrderAudit)
    {
        return hisMedicineOrderAuditMapper.selectHisMedicineOrderAuditList(hisMedicineOrderAudit);
    }

    /**
     * 新增审核信息
     * 
     * @param hisMedicineOrderAudit 审核信息
     * @return 结果
     */
    @Override
    public int insertHisMedicineOrderAudit(HisMedicineOrderAudit hisMedicineOrderAudit)
    {
        hisMedicineOrderAudit.setCreateTime(DateUtils.getNowDate());
        return hisMedicineOrderAuditMapper.insertHisMedicineOrderAudit(hisMedicineOrderAudit);
    }

    /**
     * 修改审核信息
     * 
     * @param hisMedicineOrderAudit 审核信息
     * @return 结果
     */
    @Override
    public int updateHisMedicineOrderAudit(HisMedicineOrderAudit hisMedicineOrderAudit)
    {
        hisMedicineOrderAudit.setUpdateTime(DateUtils.getNowDate());
        return hisMedicineOrderAuditMapper.updateHisMedicineOrderAudit(hisMedicineOrderAudit);
    }

    /**
     * 批量删除审核信息
     * 
     * @param auditIds 需要删除的审核信息主键
     * @return 结果
     */
    @Override
    public int deleteHisMedicineOrderAuditByAuditIds(Long[] auditIds)
    {
        return hisMedicineOrderAuditMapper.deleteHisMedicineOrderAuditByAuditIds(auditIds);
    }

    /**
     * 删除审核信息信息
     * 
     * @param auditId 审核信息主键
     * @return 结果
     */
    @Override
    public int deleteHisMedicineOrderAuditByAuditId(Long auditId)
    {
        return hisMedicineOrderAuditMapper.deleteHisMedicineOrderAuditByAuditId(auditId);
    }
}
